﻿<local:DocumentBase x:Class="WPFExcelReport.DSTWBQILIST"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:db="clr-namespace:DSTWBQILIST"
                    Height="700" Width="1200" 
                    Title="成品检验报表"  
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <db:SETDSTWBQILIST  x:Key="SETUI" />
        <CollectionViewSource   x:Key="vwWBBST" Source="{Binding Path=WBBST,Source={StaticResource SETUI}}" />
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel  Grid.Row="0" Grid.Column="0">
            <WrapPanel Name="ZoneOrder">
                <TextBlock FontSize="35"  Height="Auto" Width="120">日期:</TextBlock>
                <TextBox   FontSize="35" Name="txtWKDATE"  Width="200" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="White" />
                <Button Margin="20,0,0,0" FontSize="35" Background="Yellow" x:Name="btnQuery" Click="btnQuery_Click" Width="100" BorderThickness="1" Content="查询"/>
                <Button Margin="20,0,0,0" FontSize="35" Name="btnPrint" Click="btnPrint_Click" Width="100" HorizontalAlignment="Left" >打印</Button>
            </WrapPanel>
     
            <DataGrid 
                CanUserReorderColumns="True"  
                CanUserResizeRows="True" CanUserSortColumns="True"
                AutoGenerateColumns="False"   
                EnableRowVirtualization="True"  
                MaxHeight="600"
                FontSize="14"
                RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                IsSynchronizedWithCurrentItem="True" Visibility="Visible"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwWBBST}}" 
                Margin="0,2,0,0" 
                x:Name="dlgWBBST" >
                <DataGrid.Columns>
                    <!--机号	日期	检验员	花号	坯布卷号	坯布码长	修布工号	成品卷号	成品码长M	成品码长Y	实际门幅	有效门幅	纬密	拼匹情况	库位	备注-->
                    <DataGridTextColumn Header="机号" Width="60" Binding="{Binding WBEWMLFDNR}"/>
                    <DataGridTextColumn Header="日期" Binding="{Binding WBEWBUCHDAT}"/>
                    <DataGridTextColumn Header="检验员" Binding="{Binding WBEWBUCHBEN}"/>
                    <DataGridTextColumn Header="小花号" Width="80" Binding="{Binding WBBART}"/>
                    <DataGridTextColumn Header="坯布卷号" Binding="{Binding RSTKNR}"/>
                    <DataGridTextColumn Header="坯布码长" Binding="{Binding RSTKLG, Converter={StaticResource ResourceKey=d1000}}"/>
                    <DataGridTextColumn Header="修布工号" Binding="{Binding WBBBEM}"/>
                    <DataGridTextColumn Header="成品卷号" Binding="{Binding WBEWSTKNR}"/>
                    <DataGridTextColumn Header="成品码长M" Binding="{Binding WBBISTKLG, Converter={StaticResource ResourceKey=d1000}}"/>
                    <DataGridTextColumn Header="实际门幅" Binding="{Binding WBBSBRT}"/>
                    <DataGridTextColumn Header="有效门幅" Binding="{Binding WBBIBRT}"/>
                    <DataGridTextColumn Header="拼匹情况" Binding="{Binding WBBBEM}"/>
                    <DataGridTextColumn Header="库位" Binding="{Binding WBEWLO}"/>
                    <DataGridTextColumn Header="备注" Binding="{Binding COMMENTS}"/>
                </DataGrid.Columns>
            </DataGrid  >
        </StackPanel>
    </Grid>
</local:DocumentBase>